<template>
  <span>
    <el-button round size="mini" @click="dialogPswdMethods">修改</el-button>
          <!-- 修改密码弹出框 -->
              <el-dialog title="密码" :visible.sync="dialogPswd" center>
              <div slot="title" class="header-title">
                <img src="../assets/pic@2x/mima@2x.png" alt>
                <div style="font-weight:300;color:rgba(0,0,0)">密码修改</div>
              </div>
              <el-form :model="form">
                <el-form-item label="新密码" :label-width="formLabelWidth">
                  <el-input v-model="form.name" autocomplete="off" placeholder="请输入新密码"></el-input>
                </el-form-item>
                 <el-form-item label="确认新密码" :label-width="formLabelWidth">
                  <el-input v-model="form.name" autocomplete="off" placeholder="请确认新密码"></el-input>
                </el-form-item>
              </el-form>
              <div slot="footer" class="dialog-footer" style="height:100px;">
                <el-button
                  type="primary"
                  @click="dialogPswdMethods"
                  style="float:none;width:40%;margin-right:0;"
                >确 定 修 改</el-button>
              </div>
            </el-dialog>
  </span>
</template>
<script>
export default {
  data() {
    return {
      dialogPswd: false,
      form: {
        name: "",
      },
      formLabelWidth: "120px"
    };
  },
   methods: {
    dialogPswdMethods() {
      this.dialogPswd = !this.dialogPswd;
       if (this.dialogPswd == true) {
        console.log("打开密码弹出框触发的事件");
      } else {
        console.log("关闭密码弹出框触发的事件");
      }
    },
  }
};
</script>
<style lang="less" scoped>
.el-button {
  float: right;
  margin: 20px 30px 0 0;
  background: #171c61;
  color: #fff;
}

</style>

